<html>
<head><meta charset="utf-8"><title>Getting x.py clippy to work · t-cargo · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/index.html">t-cargo</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html">Getting x.py clippy to work</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="211697334"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211697334" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211697334">(Sep 29 2020 at 23:22)</a>:</h4>
<p>I'm trying to work on <a href="https://github.com/rust-lang/rust/issues/77309">https://github.com/rust-lang/rust/issues/77309</a> and I changed x.py to pass <code>--sysroot</code> unconditionally when running <code>cargo clippy</code>. That gives the following clippy error:</p>
<div class="codehilite"><pre><span></span><code>error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn&#39;t exit successfully: `/home/joshua/.local/lib/rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/clippy-driver /home/joshua/rustc/build/bootstrap/debug/rustc - --crate-name ___ --print=file-names --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg` (exit code: 1)
  --- stderr
  error: Option &#39;sysroot&#39; given more than once
</code></pre></div>


<p>But sysroot doesn't show up here at all! Is cargo passing it? Is there a way to see what RUSTFLAGS are set and that cargo passes to clippy-driver?</p>



<a name="211697342"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211697342" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211697342">(Sep 29 2020 at 23:22)</a>:</h4>
<p>cc <span class="user-mention" data-user-id="116122">@simulacrum</span></p>



<a name="211697463"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211697463" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211697463">(Sep 29 2020 at 23:24)</a>:</h4>
<p>this is the cargo invocation:</p>
<div class="codehilite"><pre><span></span><code>running: &quot;/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage0/bin/cargo&quot; &quot;clippy&quot; &quot;--target&quot; &quot;x86_64-unknown-linux-gnu&quot; &quot;-Zbinary-dep-depinfo&quot; &quot;-j&quot; &quot;8&quot; &quot;-v&quot; &quot;--release&quot; &quot;--features&quot; &quot;panic-unwind backtrace compiler-builtins-c&quot; &quot;--manifest-path&quot; &quot;/home/joshua/rustc/library/test/Cargo.toml&quot; &quot;--message-format&quot; &quot;json-render-diagnostics&quot; &quot;--&quot; &quot;--cap-lints&quot; &quot;warn&quot; &quot;--sysroot&quot; &quot;/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage0-sysroot&quot;
</code></pre></div>



<a name="211698115"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211698115" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211698115">(Sep 29 2020 at 23:34)</a>:</h4>
<p>clippy is setting --sysroot: <a href="https://github.com/rust-lang/rust-clippy/blob/master/src/driver.rs#L354">https://github.com/rust-lang/rust-clippy/blob/master/src/driver.rs#L354</a></p>



<a name="211699812"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211699812" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211699812">(Sep 29 2020 at 23:55)</a>:</h4>
<p><span class="user-mention" data-user-id="232545">@Joshua Nelson</span>  I think you should be able to set the SYSROOT environment variable. Would that work?</p>



<a name="211699846"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211699846" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211699846">(Sep 29 2020 at 23:56)</a>:</h4>
<p>yeah, I tried that and it got me a little further</p>



<a name="211699881"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211699881" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211699881">(Sep 29 2020 at 23:56)</a>:</h4>
<p>now clippy is trying to load libstd from the sysroot before it's built</p>



<a name="211699903"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211699903" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211699903">(Sep 29 2020 at 23:56)</a>:</h4>
<p>which seems really odd - why would it need libstd?</p>



<a name="211700043"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211700043" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211700043">(Sep 29 2020 at 23:58)</a>:</h4>
<p>let me try -Z treat-err-as-bug</p>



<a name="211700259"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211700259" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211700259">(Sep 30 2020 at 00:01)</a>:</h4>
<p>oh actually this might not be clippy's fault</p>
<div class="codehilite"><pre><span></span><code>error[E0463]: can&#39;t find crate for `std`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error: could not compile `cc`
</code></pre></div>



<a name="211700763"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211700763" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211700763">(Sep 30 2020 at 00:07)</a>:</h4>
<p>do you know how to pass arguments to just clippy and not rustc through x.py? I tried <code>RUSTFLAGS_BOOTSTRAP</code> which passes to rustc and <code>x.py clippy -- &lt;my_args&gt;</code> which said the arguments weren't recognized</p>



<a name="211700891"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211700891" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211700891">(Sep 30 2020 at 00:08)</a>:</h4>
<p>I'm not sure I understand the question.  Clippy is rustc.</p>



<a name="211700956"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211700956" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211700956">(Sep 30 2020 at 00:09)</a>:</h4>
<p>no, clippy is a wrapper around rustc that understands more arguments than rustc does</p>



<a name="211700961"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211700961" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211700961">(Sep 30 2020 at 00:09)</a>:</h4>
<p>rustc doesn't recognize <code>--fix</code></p>



<a name="211701020"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211701020" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211701020">(Sep 30 2020 at 00:10)</a>:</h4>
<p>I guess the question is how to pass more arguments to cargo really</p>



<a name="211701080"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211701080" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211701080">(Sep 30 2020 at 00:11)</a>:</h4>
<p>If you are referring to passing flags to <code>cargo clippy</code>, I think that would be done with CARGOFLAGS_NOT_BOOTSTRAP or CARGOFLAGS_BOOTSTRAP</p>



<a name="211701481"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211701481" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211701481">(Sep 30 2020 at 00:17)</a>:</h4>
<p>FWIW, I think this will be quite difficult to fix. One approach I might suggest is to not run <code>cargo clippy</code>, and instead run <code>cargo check</code> with <code>RUSTC</code> set to the bootstrap wrapper, and "RUSTC_REAL" set to <code>clippy-driver</code>. I dunno if that would help, but might cut down on some of the complexity.</p>
<p>Otherwise, it looks like the fundamental problem is that you'll need to recreate all the logic in <code>bootstrap/bin/rustc.rs</code>, which might not be possible running <code>cargo clippy</code>.</p>



<a name="211701622"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211701622" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211701622">(Sep 30 2020 at 00:19)</a>:</h4>
<p>ooh that's nicer than having a new <code>CLIPPY</code> env var, yeah</p>



<a name="211702305"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211702305" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211702305">(Sep 30 2020 at 00:30)</a>:</h4>
<p>does bootstrap strip environment variables? Is there a way to set arbitrary env variables for cargo?</p>



<a name="211702568"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211702568" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211702568">(Sep 30 2020 at 00:34)</a>:</h4>
<p>The only environment variables that it seems to remove are MAKEFLAGS and MFLAGS.   If you want to set env vars from the command-line, you can set them like normal. If you are trying to set them inside bootstrap, that would just be a normal call to <code>.env()</code> on the Command builder.</p>



<a name="211702588"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211702588" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211702588">(Sep 30 2020 at 00:34)</a>:</h4>
<p>hmm, that's weird that clippy isn't fixing anything even with <code>__CARGO_FIX_YOLO</code> then</p>



<a name="211702596"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211702596" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211702596">(Sep 30 2020 at 00:34)</a>:</h4>
<p>maybe it sees that one of the earlier crates failed to build and refuses to apply any changes?</p>



<a name="211702662"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211702662" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211702662">(Sep 30 2020 at 00:35)</a>:</h4>
<p><code>cargo fix</code> won't apply fixes on error unless <code>--broken-code</code> is used.</p>



<a name="211702764"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211702764" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211702764">(Sep 30 2020 at 00:37)</a>:</h4>
<p>this is an error in another crate, but let me try --broken-code too</p>



<a name="211702807"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211702807" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211702807">(Sep 30 2020 at 00:37)</a>:</h4>
<p>nope, no luck</p>



<a name="211703225"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211703225" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211703225">(Sep 30 2020 at 00:44)</a>:</h4>
<blockquote>
<p>One approach I might suggest is to not run cargo clippy, and instead run cargo check with RUSTC set to the bootstrap wrapper, and "RUSTC_REAL" set to clippy-driver. I dunno if that would help, but might cut down on some of the complexity.</p>
</blockquote>
<p>Wouldn't that disallow passing any arguments (like <code>--fix</code>) to the cargo wrapper? Or is <code>clippy-driver</code> the cargo wrapper?</p>



<a name="211703352"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211703352" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211703352">(Sep 30 2020 at 00:46)</a>:</h4>
<p>Yea, that would prevent <code>--fix</code> from working directly.  You would have to recreate that in bootstrap. It's fairly simple (run <code>cargo fix</code> with <code>RUSTC_WORKSPACE_WRAPPER</code> set instead of <code>RUSTC</code>).</p>



<a name="211703391"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211703391" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211703391">(Sep 30 2020 at 00:47)</a>:</h4>
<p>(Just note that <code>--fix</code> in clippy is experimental, and I think might have some issues.)</p>



<a name="211703490"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211703490" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211703490">(Sep 30 2020 at 00:49)</a>:</h4>
<p>you're right, this does sound painful <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span></p>



<a name="211861720"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211861720" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211861720">(Oct 01 2020 at 02:02)</a>:</h4>
<p>does cargo preserve environment variables when it spawns rustc/rustdoc/clippy-driver?</p>



<a name="211861732"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211861732" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211861732">(Oct 01 2020 at 02:03)</a>:</h4>
<p>wait I think I asked this already lol</p>



<a name="211861746"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211861746" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211861746">(Oct 01 2020 at 02:03)</a>:</h4>
<p>actually it must because it preserves SYSROOT</p>



<a name="211861759"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211861759" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211861759">(Oct 01 2020 at 02:03)</a>:</h4>
<p>so I'm confused why this isn't working then :/</p>
<div class="codehilite" data-code-language="Diff"><pre><span></span><code><span class="gh">diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs</span>
<span class="gh">index 58c96b2bcb3..786b3072c6a 100644</span>
<span class="gd">--- a/src/bootstrap/builder.rs</span>
<span class="gi">+++ b/src/bootstrap/builder.rs</span>
<span class="gu">@@ -781,6 +781,11 @@ impl&lt;'a&gt; Builder&lt;'a&gt; {</span>
         } else if cmd == "clippy" {
             // clippy overwrites any sysroot we pass. Tell it to use the appropriate sysroot instead.
             cargo.env("SYSROOT", self.sysroot(compiler));
<span class="gi">+            // There is no clippy.rs binary. Overwrite the dylib from here instead.</span>
<span class="gi">+            let libdir = self.rustc_libdir(compiler);</span>
<span class="gi">+            let mut dylib_path = util::dylib_path();</span>
<span class="gi">+            dylib_path.insert(0, PathBuf::from(libdir));</span>
<span class="gi">+            cargo.env(util::dylib_path_var(), env::join_paths(&amp;dylib_path).unwrap());</span>
         }

         cargo.env("CARGO_TARGET_DIR", &amp;out_dir).arg(cmd);
</code></pre></div>

<p>I don't think <a href="http://rustdoc.rs">rustdoc.rs</a> does anything else special.</p>



<a name="211861927"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211861927" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211861927">(Oct 01 2020 at 02:06)</a>:</h4>
<p>maybe it needs the logic from <a href="http://rustc.rs">rustc.rs</a> too?</p>



<a name="211862038"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211862038" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211862038">(Oct 01 2020 at 02:09)</a>:</h4>
<p>the only difference I saw was <code>-Z unstable-if-unmarked</code>; I tried passing that without success</p>



<a name="211864158"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211864158" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211864158">(Oct 01 2020 at 02:54)</a>:</h4>
<p><span class="user-mention" data-user-id="232545">@Joshua Nelson</span> Here is a solution to get <code>x.py clippy library/std</code> to work: </p>
<ul>
<li>Pass <code>-Zunstable-options</code> after the <code>clippy</code> argument in <code>cargo clippy</code>.  This enables a special mode that limits clippy's scope.</li>
<li>Pass <code>--sysroot</code> <code>self.sysroot(compiler)</code> on the command-line (also after the <code>clippy</code> arg).</li>
<li>Do <strong>not</strong> set <code>--cfg=bootstrap</code> (since it is running nightly clippy).</li>
<li>Do <strong>not</strong> set the <code>RUSTC</code> environment variable. <code>cargo clippy</code> is running on nightly, we don't want to break building of build scripts.</li>
</ul>
<p>With that I was able to get it to pass.</p>



<a name="211864182"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211864182" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211864182">(Oct 01 2020 at 02:55)</a>:</h4>
<blockquote>
<p>Pass --sysroot self.sysroot(compiler) on the command-line (also after the clippy arg).</p>
</blockquote>
<p>This will conflict with clippy's sysroot, no? I set <code>SYSROOT</code> in my draft PR and that seemed to work</p>



<a name="211864260"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211864260" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211864260">(Oct 01 2020 at 02:56)</a>:</h4>
<p>You want to mess with clippy's sysroot.  I think the key factor is setting <code>-Zunstable-options</code>, so that clippy will only run for the std crates (and not build scripts).</p>



<a name="211864266"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211864266" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211864266">(Oct 01 2020 at 02:56)</a>:</h4>
<p>I'll give it a shot!</p>



<a name="211864349"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211864349" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211864349">(Oct 01 2020 at 02:58)</a>:</h4>
<p>Here's the hack off latest master:</p>
<div class="codehilite" data-code-language="Diff"><pre><span></span><code><span class="gh">diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs</span>
<span class="gh">index 4aaaeb8a93b..70965fe8ec4 100644</span>
<span class="gd">--- a/src/bootstrap/builder.rs</span>
<span class="gi">+++ b/src/bootstrap/builder.rs</span>
<span class="gu">@@ -781,6 +781,7 @@ impl&lt;'a&gt; Builder&lt;'a&gt; {</span>
         }

         cargo.env("CARGO_TARGET_DIR", &amp;out_dir).arg(cmd);
<span class="gi">+        cargo.arg("-Zunstable-options");</span>

         let profile_var = |name: &amp;str| {
             let profile = if self.config.rust_optimize { "RELEASE" } else { "DEV" };
<span class="gu">@@ -832,8 +833,9 @@ impl&lt;'a&gt; Builder&lt;'a&gt; {</span>
                 cargo.args(s.split_whitespace());
             }
             rustflags.env("RUSTFLAGS_BOOTSTRAP");
<span class="gd">-            rustflags.arg("--cfg=bootstrap");</span>
<span class="gi">+            // rustflags.arg("--cfg=bootstrap");</span>
         }
<span class="gi">+        rustflags.arg(&amp;format!("--sysroot={}", self.sysroot(compiler).display()));</span>

         if self.config.rust_new_symbol_mangling {
             rustflags.arg("-Zsymbol-mangling-version=v0");
<span class="gu">@@ -955,7 +957,7 @@ impl&lt;'a&gt; Builder&lt;'a&gt; {</span>
         // src/bootstrap/bin/{rustc.rs,rustdoc.rs}
         cargo
             .env("RUSTBUILD_NATIVE_DIR", self.native_dir(target))
<span class="gd">-            .env("RUSTC", self.out.join("bootstrap/debug/rustc"))</span>
<span class="gi">+            // .env("RUSTC", self.out.join("bootstrap/debug/rustc"))</span>
             .env("RUSTC_REAL", self.rustc(compiler))
             .env("RUSTC_STAGE", stage.to_string())
             .env("RUSTC_SYSROOT", &amp;sysroot)
</code></pre></div>



<a name="211864363"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211864363" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211864363">(Oct 01 2020 at 02:58)</a>:</h4>
<p>Making that integrate cleanly is the challenge. <span aria-label="stuck out tongue wink" class="emoji emoji-1f61c" role="img" title="stuck out tongue wink">:stuck_out_tongue_wink:</span></p>



<a name="211864381"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211864381" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211864381">(Oct 01 2020 at 02:59)</a>:</h4>
<p>most of it should be pretty easy to do by modifying <code>fn args</code> I think</p>



<a name="211864392"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211864392" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211864392">(Oct 01 2020 at 02:59)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/master/src/bootstrap/check.rs#L17">https://github.com/rust-lang/rust/blob/master/src/bootstrap/check.rs#L17</a></p>



<a name="211864413"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211864413" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211864413">(Oct 01 2020 at 03:00)</a>:</h4>
<p>and then only set <code>RUSTC</code> if this isn't clippy</p>



<a name="211864442"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211864442" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211864442">(Oct 01 2020 at 03:00)</a>:</h4>
<p>that seems doable</p>



<a name="211867100"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211867100" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211867100">(Oct 01 2020 at 04:03)</a>:</h4>
<p>ok I'm very confused how you got sysroot to work</p>



<a name="211867109"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211867109" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211867109">(Oct 01 2020 at 04:03)</a>:</h4>
<p>here it is passed to <code>cargo clippy</code>:</p>
<div class="codehilite"><pre><span></span><code>error: Found argument &#39;--sysroot&#39; which wasn&#39;t expected, or isn&#39;t valid in this context
</code></pre></div>


<p>and passed to <code>clippy-driver</code>:</p>
<div class="codehilite"><pre><span></span><code>error: Option &#39;sysroot&#39; given more than once
</code></pre></div>



<a name="211867159"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211867159" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211867159">(Oct 01 2020 at 04:04)</a>:</h4>
<p>It should be passed in RUSTFLAGS.</p>



<a name="211867165"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211867165" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211867165">(Oct 01 2020 at 04:04)</a>:</h4>
<p>oh I see</p>



<a name="211867423"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211867423" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211867423">(Oct 01 2020 at 04:11)</a>:</h4>
<p>ok, we're getting close I think:</p>
<div class="codehilite"><pre><span></span><code>error[E0723]: function pointers in const fn are unstable
   --&gt; library/core/src/task/wake.rs:136:9
    |
136 |         clone: unsafe fn(*const ()) -&gt; RawWaker,
    |         ^^^^^
    |
    = note: see issue #57563 &lt;https://github.com/rust-lang/rust/issues/57563&gt; for more information
    = help: add `#![feature(const_fn)]` to the crate attributes to enable
</code></pre></div>


<p>this is from:</p>
<div class="codehilite" data-code-language="Diff"><pre><span></span><code><span class="gh">diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs</span>
<span class="gh">index 58c96b2bcb3..3b9675f2ca5 100644</span>
<span class="gd">--- a/src/bootstrap/builder.rs</span>
<span class="gi">+++ b/src/bootstrap/builder.rs</span>
<span class="gu">@@ -830,6 +830,11 @@ impl&lt;'a&gt; Builder&lt;'a&gt; {</span>
                 cargo.args(s.split_whitespace());
             }
             rustflags.env("RUSTFLAGS_NOT_BOOTSTRAP");
<span class="gi">+        } else if cmd == "clippy" {</span>
<span class="gi">+            rustflags.env("RUSTFLAGS");</span>
<span class="gi">+            rustflags.arg("--sysroot");</span>
<span class="gi">+            rustflags.arg(self.sysroot(compiler).as_os_str().to_str().expect("sysroo</span>
t must be valid UTF-8"));
<span class="gi">+            cargo.arg("-Zunstable-options");</span>
         } else {
             if let Ok(s) = env::var("CARGOFLAGS_BOOTSTRAP") {
                 cargo.args(s.split_whitespace());
<span class="gu">@@ -958,7 +963,6 @@ impl&lt;'a&gt; Builder&lt;'a&gt; {</span>
         // src/bootstrap/bin/{rustc.rs,rustdoc.rs}
         cargo
             .env("RUSTBUILD_NATIVE_DIR", self.native_dir(target))
<span class="gd">-            .env("RUSTC", self.out.join("bootstrap/debug/rustc"))</span>
             .env("RUSTC_REAL", self.rustc(compiler))
             .env("RUSTC_STAGE", stage.to_string())
             .env("RUSTC_SYSROOT", &amp;sysroot)
<span class="gu">@@ -974,6 +978,9 @@ impl&lt;'a&gt; Builder&lt;'a&gt; {</span>
             )
             .env("RUSTC_ERROR_METADATA_DST", self.extended_error_dir())
             .env("RUSTC_BREAK_ON_ICE", "1");
<span class="gi">+        if cmd != "clippy" {</span>
<span class="gi">+            cargo.env("RUSTC", self.out.join("bootstrap/debug/rustc"));</span>
<span class="gi">+        }</span>

         // Dealing with rpath here is a little special, so let's go into some
         // detail. First off, `-rpath` is a linker option on Unix platforms
</code></pre></div>



<a name="211867492"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211867492" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211867492">(Oct 01 2020 at 04:12)</a>:</h4>
<p>let me try also removing the SYSROOT env var?</p>



<a name="211867525"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211867525" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211867525">(Oct 01 2020 at 04:13)</a>:</h4>
<p>nope, didn't help</p>



<a name="211867565"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211867565" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211867565">(Oct 01 2020 at 04:14)</a>:</h4>
<p>let me just add <code>feature(const_fn)</code> maybe</p>



<a name="211867582"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211867582" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211867582">(Oct 01 2020 at 04:14)</a>:</h4>
<p>... it already has feature(const_fn)</p>



<a name="211867585"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211867585" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211867585">(Oct 01 2020 at 04:14)</a>:</h4>
<p>well that's strange</p>



<a name="211867608"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211867608" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211867608">(Oct 01 2020 at 04:15)</a>:</h4>
<p>it does use <code>#![cfg_attr(not(bootstrap), feature(const_fn_fn_ptr_basics))]</code> though</p>



<a name="211867612"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211867612" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211867612">(Oct 01 2020 at 04:15)</a>:</h4>
<p>maybe it needs to be unconditional?</p>



<a name="211867668"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211867668" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211867668">(Oct 01 2020 at 04:16)</a>:</h4>
<p><span class="user-mention" data-user-id="232545">@Joshua Nelson</span> I think you missed the removal of <code>--cfg bootstrap</code></p>



<a name="211867683"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211867683" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211867683">(Oct 01 2020 at 04:16)</a>:</h4>
<p><code>--cfg bootstrap</code> is in the <code>else</code></p>



<a name="211867689"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211867689" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211867689">(Oct 01 2020 at 04:16)</a>:</h4>
<p>it does look like it's still getting set though</p>



<a name="211867717"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211867717" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211867717">(Oct 01 2020 at 04:17)</a>:</h4>
<p><code>x.py check</code> defaults to stage0, so the else clause is what gets used.  You don't want <code>--cfg bootstrap</code>, since you are using nightly</p>



<a name="211867772"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211867772" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211867772">(Oct 01 2020 at 04:18)</a>:</h4>
<p>wait, I thought only clippy needed to remove <code>cfg=bootstrap</code>? and check still needs it?</p>



<a name="211867797"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211867797" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211867797">(Oct 01 2020 at 04:19)</a>:</h4>
<p>yea, clippy should not use <code>--cfg bootstrap</code> (because it is running the nightly clippy), but <code>x.py check</code> should use it because it is using stage0 (beta)</p>



<a name="211867798"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211867798" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211867798">(Oct 01 2020 at 04:19)</a>:</h4>
<p>oh hold on, I'm setting RUSTFLAGS and not RUSTFLAGS_BOOTSTRAP</p>



<a name="211867881"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211867881" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211867881">(Oct 01 2020 at 04:21)</a>:</h4>
<p>I think this feature gate might not be on beta?</p>



<a name="211867929"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211867929" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211867929">(Oct 01 2020 at 04:22)</a>:</h4>
<p><code>    #[cfg_attr(not(bootstrap), allow_internal_unstable(const_fn_fn_ptr_basics))]</code></p>



<a name="211867950"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211867950" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211867950">(Oct 01 2020 at 04:23)</a>:</h4>
<p>I'm confused how you got this working :/</p>



<a name="211867961"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211867961" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211867961">(Oct 01 2020 at 04:23)</a>:</h4>
<p>Hm, lemme see. That was added a couple days ago, which nightly are you running?</p>



<a name="211867967"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211867967" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211867967">(Oct 01 2020 at 04:23)</a>:</h4>
<p>oh I've been using beta</p>



<a name="211867969"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211867969" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211867969">(Oct 01 2020 at 04:24)</a>:</h4>
<p>does this need to use nightly?</p>



<a name="211868008"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211868008" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211868008">(Oct 01 2020 at 04:24)</a>:</h4>
<p>how would that work with bootstrap?</p>



<a name="211868029"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211868029" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211868029">(Oct 01 2020 at 04:25)</a>:</h4>
<p>Yea, it needs nightly.  AFAIK, bootstrap doesn't download clippy.</p>



<a name="211868039"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211868039" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211868039">(Oct 01 2020 at 04:25)</a>:</h4>
<p><span aria-label="shrug" class="emoji emoji-1f937" role="img" title="shrug">:shrug:</span> I just tried <code>x.py clippy</code> with unconditionally passing <code>--cfg bootstrap</code> and it worked</p>



<a name="211868082"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211868082" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211868082">(Oct 01 2020 at 04:26)</a>:</h4>
<p>even went on to run on rustc itself :)</p>



<a name="211868110"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211868110" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211868110">(Oct 01 2020 at 04:27)</a>:</h4>
<p>Yea, that'll be an issue if you use nightly, though.  <code>--cfg bootstrap</code> should only be used with beta.</p>



<a name="211868112"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211868112" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211868112">(Oct 01 2020 at 04:27)</a>:</h4>
<p>(my default toolchain is nightly btw, so maybe that is important here)</p>



<a name="211868167"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211868167" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211868167">(Oct 01 2020 at 04:28)</a>:</h4>
<p>I would be surprised if the default toolchain had anything to do with it. Do you mean you changed <code>src/stage0.txt</code>?</p>



<a name="211868177"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211868177" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211868177">(Oct 01 2020 at 04:28)</a>:</h4>
<p>No, I use a rustup directory override.</p>



<a name="211868181"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211868181" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211868181">(Oct 01 2020 at 04:28)</a>:</h4>
<p>or is ignoring stage0.txt because I didn't set RUSTC?</p>



<a name="211868188"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211868188" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211868188">(Oct 01 2020 at 04:28)</a>:</h4>
<p>This works because <code>x.py</code> is running <code>cargo clippy</code> which runs <code>~/.cargo/bin/cargo-clippy</code> which runs whatever rustup thinks it should run.</p>



<a name="211868196"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211868196" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211868196">(Oct 01 2020 at 04:29)</a>:</h4>
<p>ah hmm</p>



<a name="211868223"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211868223" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211868223">(Oct 01 2020 at 04:29)</a>:</h4>
<p>something is off here then, because my default is also nightly on this machien</p>



<a name="211868226"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211868226" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211868226">(Oct 01 2020 at 04:29)</a>:</h4>
<p>let me try updating</p>



<a name="211868296"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211868296" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211868296">(Oct 01 2020 at 04:30)</a>:</h4>
<p>ok yes that fixes the error</p>



<a name="211868298"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211868298" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211868298">(Oct 01 2020 at 04:30)</a>:</h4>
<p>but I think it's safer to always pass <code>--cfg bootstrap</code> since that seems to make it work with both</p>



<a name="211868403"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211868403" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211868403">(Oct 01 2020 at 04:33)</a>:</h4>
<p>can you try this locally and see if it make <code>x.py clippy</code> work? <a href="https://hastebin.com/oyozecapiy.php">https://hastebin.com/oyozecapiy.php</a></p>



<a name="211868478"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211868478" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211868478">(Oct 01 2020 at 04:35)</a>:</h4>
<p>btw not setting RUSTC means there's no way for clippy to figure out the sysroot on its own</p>



<a name="211868486"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211868486" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211868486">(Oct 01 2020 at 04:35)</a>:</h4>
<p>maybe not a big deal, this seems to be a hack in general</p>



<a name="211868507"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211868507" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211868507">(Oct 01 2020 at 04:35)</a>:</h4>
<p>I get this error with your patch:</p>
<div class="codehilite"><pre><span></span><code>error: attributes starting with `rustc` are reserved for use by the `rustc` compiler
   --&gt; library/core/src/task/wake.rs:134:27
    |
134 |     #[cfg_attr(bootstrap, rustc_allow_const_fn_ptr)]
    |                           ^^^^^^^^^^^^^^^^^^^^^^^^
</code></pre></div>



<a name="211868550"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211868550" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211868550">(Oct 01 2020 at 04:36)</a>:</h4>
<p><code>rustc 1.48.0-nightly (ef663a8a4 2020-09-30)</code></p>



<a name="211868559"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211868559" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211868559">(Oct 01 2020 at 04:36)</a>:</h4>
<p>hmm I get that too now, not sure what changed - it was working a second ago</p>



<a name="211868561"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211868561" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211868561">(Oct 01 2020 at 04:36)</a>:</h4>
<p>on <a href="https://github.com/rust-lang/rust/commit/b218b952f800c1160b8b5e764ca651b02d678565">b218b952f800c1160b8b5e764ca651b02d678565</a></p>



<a name="211868588"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211868588" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211868588">(Oct 01 2020 at 04:37)</a>:</h4>
<p>I'm pretty sure <code>--cfg bootstrap</code> shouldn't be set if using nightly clippy.</p>



<a name="211868593"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211868593" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211868593">(Oct 01 2020 at 04:37)</a>:</h4>
<p>ok, I'll remove it</p>



<a name="211868682"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211868682" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211868682">(Oct 01 2020 at 04:39)</a>:</h4>
<p>actually, could we set <code>--cfg bootstrap</code> depending on whether the <code>cargo-clippy</code> in PATH is beta or nightly?</p>



<a name="211868690"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211868690" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211868690">(Oct 01 2020 at 04:39)</a>:</h4>
<p>unfortunately clippy's version scheme is ... odd ... but maybe we could rely on <code>rustc --version</code> or something</p>



<a name="211868788"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211868788" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211868788">(Oct 01 2020 at 04:41)</a>:</h4>
<p>thank you so much for you help btw <span aria-label="heart" class="emoji emoji-2764" role="img" title="heart">:heart:</span> I would never have gotten this far on my own</p>



<a name="211868791"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211868791" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211868791">(Oct 01 2020 at 04:41)</a>:</h4>
<p><span aria-label="shrug" class="emoji emoji-1f937" role="img" title="shrug">:shrug:</span>   I'm not sure if the extra complexity in the bootstrap code is really warranted. I wouldn't really expect anyone to run these commands anyways, and if they do, it could be documented to use the latest nightly.</p>



<a name="211869520"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211869520" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211869520">(Oct 01 2020 at 04:57)</a>:</h4>
<p>well, even with <code>--cfg=bootstrap</code> it breaks on beta so I'm giving up on that in the first draft</p>



<a name="211869522"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/211869522" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#211869522">(Oct 01 2020 at 04:57)</a>:</h4>
<p>in general I think it would be nice to have though</p>



<a name="212898892"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/212898892" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#212898892">(Oct 10 2020 at 04:41)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116122">simulacrum</span> requested that I make this work with beta :/ I'm not sure why it breaks currently so I don't know how to fix it</p>



<a name="212898896"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/212898896" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#212898896">(Oct 10 2020 at 04:41)</a>:</h4>
<p>the errors look like <code>error[E0658]: `#[doc(alias)]` is experimental</code></p>



<a name="212898940"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/212898940" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#212898940">(Oct 10 2020 at 04:42)</a>:</h4>
<p>which is weird because <code>x.py check</code> doesn't give that error and x.py check is also using the beta toolchain</p>



<a name="212898987"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/212898987" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#212898987">(Oct 10 2020 at 04:44)</a>:</h4>
<p>here is clippy on core: <a href="https://hastebin.com/uradefuxis.sql">https://hastebin.com/uradefuxis.sql</a><br>
and here is check: <a href="https://hastebin.com/aqutekafiy.sql">https://hastebin.com/aqutekafiy.sql</a></p>



<a name="212898988"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/212898988" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#212898988">(Oct 10 2020 at 04:44)</a>:</h4>
<p>... I mean, maybe the issue is that it's not going through <code>bin/rustc.rs</code>? I don't know why that would make a difference</p>



<a name="212899094"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/212899094" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#212899094">(Oct 10 2020 at 04:49)</a>:</h4>
<p>ok, here is the <em>full</em> rustc path, <em>after</em> <a href="http://rustc.rs">rustc.rs</a> spawns the real rustc <a href="https://hastebin.com/kirevalajo.bash">https://hastebin.com/kirevalajo.bash</a></p>



<a name="212899191"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/212899191" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#212899191">(Oct 10 2020 at 04:52)</a>:</h4>
<p>hmm I think clippy is missing <code>-Z force-unstable-if-unmarked</code></p>



<a name="212899193"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/212899193" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#212899193">(Oct 10 2020 at 04:52)</a>:</h4>
<p>oh wait no it's there</p>



<a name="212899194"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/212899194" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#212899194">(Oct 10 2020 at 04:52)</a>:</h4>
<p>I'm very confused</p>



<a name="212899200"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/212899200" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#212899200">(Oct 10 2020 at 04:53)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> any ideas?</p>



<a name="212899441"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/212899441" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#212899441">(Oct 10 2020 at 05:01)</a>:</h4>
<p>... I was using 1.47 beta, not 1.48 beta <span aria-label="face palm" class="emoji emoji-1f926" role="img" title="face palm">:face_palm:</span></p>



<a name="212914628"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/212914628" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#212914628">(Oct 10 2020 at 12:54)</a>:</h4>
<p><span class="user-mention" data-user-id="232545">@Joshua Nelson</span> I think you figured it out?</p>



<a name="212915665"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/212915665" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#212915665">(Oct 10 2020 at 13:19)</a>:</h4>
<p>I'm at "it works but I don't know why"</p>



<a name="212915668"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Getting%20x.py%20clippy%20to%20work/near/212915668" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Getting.20x.2Epy.20clippy.20to.20work.html#212915668">(Oct 10 2020 at 13:19)</a>:</h4>
<p>So no help needed until it breaks <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>